package com.example.conf.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 订单表
 * </p>
 *
 * @author wpdcn
 * @since 2020-03-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("shop_order")
@ApiModel(value="ShopOrderEntity对象", description="订单表")
public class ShopOrderEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @Column(comment = "主键：订单号")
    @TableId(value = "order_no", type = IdType.INPUT)
    @ApiModelProperty(value = "主键：订单号")
    private String orderNo;

    @Column(comment = "统一支付订单号")
    @ApiModelProperty("统一支付订单号")
    private String unionOrderNo;

    @Column(comment = "订单所属账户id")
    @ApiModelProperty(value = "订单所属账户id")
    private Long accountId;

    @Column(comment = "订单类型：1物业订单；2门店订单；3线上商城；4积分")
    @ApiModelProperty("订单类型：1物业订单；2门店订单；3线上商城；4积分")
    private String type;

    @Column(comment = "商品创建人")
    @ApiModelProperty("商品创建人")
    private Long goodCreateBy;

    @Column(comment = "用户id")
    @ApiModelProperty(value = "用户id")
    private String memberId;

    @Column(comment = "昵称")
    @TableField(exist = false)
    private String nickName;

    @Column(comment = "真实姓名")
    @TableField(exist = false)
    private String realName;

    @Column(comment = "订单总金额")
    @ApiModelProperty(value = "订单总金额")
    private Double totalAmt;

    @Column(comment = "订单总积分")
    @ApiModelProperty(value = "订单总积分")
    private Double totalScore;

    @Column(comment = "订单状态：1未支付；2已付款；3已发货；4已收货；5已作废；6已完成；7退货申请中；8同意退货；9不同意退货")
    @ApiModelProperty(value = "订单状态：1未支付；2已付款；3已发货；4已收货；5已作废；6已完成；7退货申请中；8同意退货；9不同意退货")
    private String status;

    @Column(comment = "账户余额支付的金额")
    @ApiModelProperty("账户余额支付的金额")
    private Double balancePay;

    @Column(comment = "实际支付的金额")
    @ApiModelProperty("实际支付的金额")
    private Double moneyPay;

    @Column(comment = "优惠券抵扣的金额")
    @ApiModelProperty("优惠券抵扣的金额")
    private Double couponPay;

    @Column(comment = "包邮邮费金额")
    @ApiModelProperty("包邮邮费金额")
    private Double freeExpressPay;

    @Column(comment = "总共支付的快递费")
    @ApiModelProperty("总共支付的快递费")
    private Double totalExpressPay;

    @Column(comment = "会员等级优惠金额")
    @ApiModelProperty("会员等级优惠金额")
    private Double memberLevelCoupon;

    @Column(comment = "使用的优惠券id")
    @ApiModelProperty("使用的优惠券id")
    private Long couponId;

    @Column(comment = "优惠券名称")
    @ApiModelProperty("优惠券名称")
    private String couponName;

    @Column(comment = "发货方式：1自取；2同城配送")
    @ApiModelProperty(value = "发货方式：1自取；2同城配送")
    private String deliveryMethod;

    @Column(comment = "发货时间")
    @ApiModelProperty("发货时间")
    private LocalDateTime deliveryTime;

    @Column(comment = "订单创建时间")
    @ApiModelProperty(value = "订单创建时间")
    private LocalDateTime createTime;

    @Column(comment = "备注")
    @ApiModelProperty(value = "备注")
    private String remark;

    @Column(comment = "收货信息id")
    @ApiModelProperty(value = "收货信息id")
    private Long deliveryId;

    @Column(comment = "收货人姓名")
    @ApiModelProperty("收货人姓名")
    private String receiver;

    @Column(comment = "收货人手机号")
    @ApiModelProperty("收货人手机号")
    private String receiverMobile;

    @Column(comment = "收货人地址")
    @ApiModelProperty("收货人地址")
    private String receiverAddress;

    @Column(comment = "技工id")
    @ApiModelProperty(value = "技工id")
    private Long mechanicId;

    @Column(comment = "技工提成")
    @ApiModelProperty("技工提成")
    private Double mechanicFee;

    @Column(comment = "扣除优惠之后订单金额转化的积分（包括账户余额支付部分）")
    @ApiModelProperty("扣除优惠之后订单金额转化的积分（包括账户余额支付部分）")
    private Double generateScore;

    @Column(comment = "订单需要转给商户的金额")
    @ApiModelProperty("订单需要转给商户的金额")
    private Double toAccountMoney;

    @Column(comment = "支付时间")
    @ApiModelProperty(value = "支付时间")
    private LocalDateTime payTime;

    @Column(comment = "支付流水号")
    @ApiModelProperty(value = "支付流水号")
    private String payNo;

    @Column(comment = "支付渠道：1微信；2支付宝；3线下支付")
    @ApiModelProperty(value = "支付渠道：1微信；2支付宝；3线下支付")
    private String payChannel;

    @Column(comment = "支付方式：1金额；2积分；3金额+积分")
    @ApiModelProperty(value = "支付方式：1金额；2积分；3金额+积分")
    private String payMethod;

    @Column(comment = "自提地点")
    @ApiModelProperty("自提地点")
    private String selfDeliveryAddress;

    @Column(comment = "逻辑删除标志")
    @TableLogic
    private Integer delFlag;

    @Column(comment = "申请退货时间")
    @ApiModelProperty("申请退货时间")
    private LocalDateTime applyReturnTime;

    @Column(comment = "退货地址id")
    @ApiModelProperty("退货地址id")
    private Long returnAddressId;

    @Column(comment = "退货运单号")
    @ApiModelProperty("退货运单号")
    private String returnOrderLogisticsNum;

    @Column(comment = "退款单号")
    @ApiModelProperty("退款单号")
    private String refundNo;

    @Column(comment = "微信退款单号")
    @ApiModelProperty("微信退款单号")
    private String refundId;

    @Column(comment = "退款金额")
    @ApiModelProperty("退款金额")
    private Double refundFee;

    @Column(comment = "退款时间")
    @ApiModelProperty("退款时间")
    private LocalDateTime refundTime;

    @Column(comment = "留言")
    @ApiModelProperty("留言")
    private String liveMessage;

    @Column(comment = "申请取消时间")
    @ApiModelProperty("申请取消时间")
    private LocalDateTime applyCancelTime;

    @Column(comment = "申请取消订单原因")
    @ApiModelProperty("申请取消订单原因")
    private String applyCancelReason;

    @Column(comment = "拒绝取消订单原因")
    @ApiModelProperty("拒绝取消订单原因")
    private String refuseCancelReason;

    @Column(comment = "退款操作人")
    @ApiModelProperty("退款操作人")
    private Long refundOpId;

    @Column(comment = "发票抬头")
    @ApiModelProperty("发票抬头")
    private String invoiceTitle;

    @Column(comment = "发票税号")
    @ApiModelProperty("发票税号")
    private String invoiceTaxNumber;

    @Column(comment = "开票方式：1-纸质普通发票；2-增值税专用发票；3-不开发票")
    @ApiModelProperty("开票方式：1-纸质普通发票；2-增值税专用发票；3-不开发票")
    private String invoiceMethod;

    @Column(comment = "发票类型")
    @ApiModelProperty("发票类型")
    private String invoiceType;

    @Column(comment = "开具类型")
    @ApiModelProperty("开具类型")
    private String openType;

    @Column(comment = "银行名称")
    @ApiModelProperty("银行名称")
    private String bankName;

    @Column(comment = "银行卡号")
    @ApiModelProperty("银行卡号")
    private String bankCardNo;

    @Column(comment = "发票地址")
    @ApiModelProperty("发票地址")
    private String invoiceAddress;

    @Column(comment = "发票手机号")
    @ApiModelProperty("发票手机号")
    private String invoiceMobile;

}
